package demo2;

import java.util.Scanner;

public class PayTest {
    public static void main(String[] args) {
        double money=20;
        System.out.println("待支付"+money);
        System.out.println("选择：1.银行卡 2.微信 3.支付宝");
        Scanner sc=new Scanner(System.in);
        switch (sc.nextInt()){
            case 1:
                Pay bankPay=new BankPay();
                bankPay.pay(money);
                break;
            case 2:
                Pay wechatPay=new WechatPay();
                wechatPay.pay(money);
                break;
            case 3:
                Pay zPay=new ZPay();
                zPay.pay(money);
                break;
        }
    }

}
